<%@page contentType="text/html;charset=UTF-8"%>
<%@page pageEncoding="UTF-8"%>
<%@ page session="true" %>
<html>
<head>
	
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
  FB.init({appId: '128354671037', status: true, cookie: true, xfbml: true});
  FB.Event.subscribe('auth.sessionChange', function(response) {
    if (response.session) {
      // A user has logged in, and a new cookie has been saved
    } else {
      // The user has logged out, and the cookie has been cleared
    }
  });
  
  FB.getLoginStatus(function(response) {
	  if (response.session) {
		  alert("user is loogged in " + response.session);
	    // logged in and connected user, someone you know
	  } else {
		  alert("user is NOT logged in");
	    // no user session available, someone you dont know
	  }
	});
	  
</script>
</body>
</html>